package com.jialiang.cli.example;

import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;

@Command(name = "ASCIIArt",version = "ASCIIArt 1.0",mixinStandardHelpOptions = true)
public class ASCIIArt implements Runnable{

    @Option(names = {"-s","--font-size"},description = "Font size")
    int fontSize = 19;

    @Parameters(paramLabel = "<word>",defaultValue = "Hello,picocli",
                description = "Words to be translated into ASCII art.")
    private String[] words = {"Hello,","picocli"};

    @Override
    public void run() {
        System.out.println("fontSize = " + fontSize);
        System.out.println("words = " + String.join(",",words));
    }

    public static void main(String[] args) {
        int exitCode = new CommandLine(new ASCIIArt()).execute(args);
        System.exit(exitCode);
    }
}
